/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.handeasy.entity;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Collection;
import javax.persistence.*;
import javax.persistence.OneToOne;

/**
 *
 * @author Aurelie
 */
@Entity
public class MarkerEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private double mLatitude;
    private double mLongitude;
    private String mNameMarker;
    private String mNumberAddress;
    private String mStreet;
    private String mPostalCode;
    private String mCity;
    private String mCountry;
    private String mNameCategory;     
    private String mNameAccess;
    private String mRestroom;
    private String mStaff;  
    private String mPhoto;
    @OneToMany(cascade= CascadeType.ALL, mappedBy = "mMarker")
    private Collection<CommentEntity> mComments;
    /**
     * Constructeur MarkerEntity
     * @return 
     */
    public MarkerEntity() {
        
    }
  
   public MarkerEntity(double lLatitude, double lLongitude, String lNameMarker, String lNumberAddress, String lStreet, String lPostalCode, String lCity, String lCountry, String lNameCategory, String lNameAccess, String lRestroom, String lStaff, String lPhoto) {
        this.mLatitude = lLatitude;
        this.mLongitude = lLongitude;
        this.mNameMarker = lNameMarker;
        this.mNumberAddress = lNumberAddress;
        this.mStreet = lStreet;
        this.mPostalCode = lPostalCode;
        this.mCity = lCity;
        this.mCountry = lCountry;
        this.mNameCategory = lNameCategory;
        this.mNameAccess = lNameAccess;
        this.mRestroom = lRestroom;
        this.mStaff = lStaff;
        this.mPhoto = lPhoto;
    }
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MarkerEntity)) {
            return false;
        }
        MarkerEntity other = (MarkerEntity) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    public Collection<CommentEntity> getmComments() {
        return mComments;
    }

    public void setmComments(Collection<CommentEntity> mComments) {
        this.mComments = mComments;
    }

    @Override
    public String toString() {
        return "com.handeasy.entity.HandiEntity[ id=" + id + " ]";
    }

    /**
     * @return the mLatitude
     */
    public double getmLatitude() {
        return mLatitude;
    }

    /**
     * @param mLatitude the mLatitude to set
     */
    public void setmLatitude(double mLatitude) {
        this.mLatitude = mLatitude;
    }

    /**
     * @return the mLongitude
     */
    public double getmLongitude() {
        return mLongitude;
    }

    /**
     * @param mLongitude the mLongitude to set
     */
    public void setmLongitude(double mLongitude) {
        this.mLongitude = mLongitude;
    }

    /**
     * @return the mNameMarker
     */
    public String getmNameMarker() {
        return mNameMarker;
    }

    /**
     * @param mNameMarker the mName to set
     */
    public void setmNameMarker(String mNameMarker) {
        this.mNameMarker = mNameMarker;
    }
 
    /**
     * @return the mNumberAddress
     */
    public String getmNumberAddress() {
        return mNumberAddress;
    }

    /**
     * @param mNumberAddress the mNumberAddress to set
     */
    public void setmNumberAddress(String mNumberAddress) {
        this.mNumberAddress = mNumberAddress;
    }

    /**
     * @return the mStreet
     */
    public String getmStreet() {
        return mStreet;
    }

    /**
     * @param mStreet the mStreet to set
     */
    public void setmStreet(String mStreet) {
        this.mStreet = mStreet;
    }

    /**
     * @return the mPostalCode
     */
    public String getmPostalCode() {
        return mPostalCode;
    }

    /**
     * @param mPostalCode the mPostalCode to set
     */
    public void setmPostalCode(String mPostalCode) {
        this.mPostalCode = mPostalCode;
    }

    /**
     * @return the mCity
     */
    public String getmCity() {
        return mCity;
    }

    /**
     * @param mCity the mCity to set
     */
    public void setmCity(String mCity) {
        this.mCity = mCity;
    }

    /**
     * @return the mCountry
     */
    public String getmCountry() {
        return mCountry;
    }

    /**
     * @param mCountry the mCountry to set
     */
    public void setmCountry(String mCountry) {
        this.mCountry = mCountry;
    }

    /**
     * @return the mNameCategory
     */
    public String getmNameCategory() {
        return mNameCategory;
    }

    /**
     * @param mNameCategory the mNameCategory to set
     */
    public void setmNameCategory(String mNameCategory) {
        this.mNameCategory = mNameCategory;
    }

    /**
     * @return the mNameAccess
     */
    public String getmNameAccess() {
        return mNameAccess;
    }

    /**
     * @param mNameAccess the mNameAccess to set
     */
    public void setmNameAccess(String mNameAccess) {
        this.mNameAccess = mNameAccess;
    }

    /**
     * @return the mRestroom
     */
    public String getmRestroom() {
        return mRestroom;
    }

    /**
     * @param mRestroom the mRestroom to set
     */
    public void setmRestroom(String mRestroom) {
        this.mRestroom = mRestroom;
    }

    /**
     * @return the mStaff
     */
    public String getmStaff() {
        return mStaff;
    }

    /**
     * @param mStaff the mStaff to set
     */
    public void setmStaff(String mStaff) {
        this.mStaff = mStaff;
    }

    /**
     * @return the mPhoto
     */
    public String getmPhoto() {
        return mPhoto;
    }

    /**
     * @param mPhoto the mPhoto to set
     */
    public void setmPhoto(String mPhoto) {
        this.mPhoto = mPhoto;
    }

   

   

    
}
